// packageAPI/pages/media/volChat/volChat.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    schema: [],
    formData: {
      data: ''
    },
    title: '',
    result: '',
    zh:'',
    apiType: '',
    remark: '',
    webUrl: '',
    apiName: '',
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.setData({
      apiType: options.zh,
      title: options.title,
      zh: options.zh,
      remark: options.remark,
      webUrl: options.webUrl
    })
  },
  setEnable1v1Chat(){
    wx.setEnable1v1Chat({
      enable: true,
      complete:(res)=>{
        this.setData({
          result:res,
          apiName:'wx.setEnable1v1Chat'
        })
      }
    })
  },
  join(){
    wx.join1v1Chat({
      caller: {
        nickname: '张三',
        openid: '21312',
      },
      listener: {
        nickname: '小星星',
        openid: '45343',
      },
      complete:(res)=>{
        this.setData({
          result:res,
          apiName:'wx.join1v1Chat'
        })
      }
    })
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})